//
// DepXMLReader
//
// Copyright (C) jextra.net.
//
//  This file is part of the net.jextra.dep Library.
//
//  The net.jextra.dep Library is free software; you can redistribute it and/or
//  modify it under the terms of the GNU Lesser General Public
//  License as published by the Free Software Foundation; either
//  version 2.1 of the License, or (at your option) any later version.
//
//  The net.jextra.dep Library is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
//  Lesser General Public License for more details.
//
//  You should have received a copy of the GNU Lesser General Public
//  License along with the net.jextra.dep Library; if not, write to the Free
//  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
//  02111-1307 USA.
//

package net.jextra.dep.util;

import java.io.*;
import org.xml.sax.*;

public abstract class DepXMLReader
{
    // ============================================================
    // Methods
    // ============================================================

    public void parse( InputStream in )
        throws SAXException, IOException
    {
        DepXMLReaderEngine engine = new DepXMLReaderEngine();
        engine.parse( this, in );
    }

    // ----------
    // protected
    // ----------

    protected abstract void startDocument()
        throws Exception;

    protected abstract void endDocument()
        throws Exception;

    protected abstract String startElement( String state, String uri, String tagName, String qName,
        Attributes atts )
        throws Exception;

    protected abstract void characters( String state, char[] value, int offset, int count )
        throws Exception;

    protected abstract void endElement( String state, String uri, String tagName, String qName )
        throws Exception;
}

